import axios from 'axios'

axios.interceptors.request.use((cfg) => {
    // 统一设置 token
    if(localStorage.getItem('token')){
        cfg.headers.Authorization = localStorage.getItem('token')
    }
    return cfg
})

axios.interceptors.response.use((res) => {
    return res
})

export default axios